package com.jmi.chmtrace.back.Controller;

import com.jmi.chmtrace.back.Pojo.User;
import com.jmi.chmtrace.back.Service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class MainController {

    @Resource
    private UserService userService;
    @GetMapping("/test")
    @ResponseBody
    public String testModel(){
        return "success";
    }

    @GetMapping("/alluser")
    @ResponseBody
    public List<User> selUser(){
        int[] a =new int[10];

        return userService.selectAllUSer();

    }
    public void test(int[] a){

    }

}
